import { http } from "@/utils/http";
import baseUrlProxy from "@/api/baseUrlProxy";

export const getTradeRetailPlanDetail = (data?: object) => {
  return http.request<any>("get", baseUrlProxy + "/api/tradeRetailPlan/by_id", {
    params: data
  });
};
export const getTradeRetailPlanAll = (data?: object) => {
  return http.request<any>("get", baseUrlProxy + "/api/tradeRetailPlan/all", {
    params: data
  });
};
export const getTradeRetailPlan = (data?: object) => {
  return http.request<any>("get", baseUrlProxy + "/api/tradeRetailPlan", {
    params: data
  });
};
export const addTradeRetailPlan = (data?: object) => {
  return http.request<any>("post", baseUrlProxy + "/api/tradeRetailPlan", {
    data: data
  });
};
export const editTradeRetailPlan = (data?: object) => {
  return http.request<any>("put", baseUrlProxy + "/api/tradeRetailPlan", {
    data: data
  });
};
export const delTradeRetailPlan = (data?: object) => {
  return http.request<any>("delete", baseUrlProxy + "/api/tradeRetailPlan", {
    data: data
  });
};

export const getTradeRetailPlanMonth = (data?: object) => {
  return http.request<any>(
    "get",
    baseUrlProxy + "/api/tradeRetailPlanMonthDetail",
    {
      params: data
    }
  );
};
export const addTradeRetailPlanMonth = (data?: object) => {
  return http.request<any>(
    "post",
    baseUrlProxy + "/api/tradeRetailPlanMonthDetail",
    {
      data: data
    }
  );
};
export const editTradeRetailPlanMonth = (data?: object) => {
  return http.request<any>(
    "put",
    baseUrlProxy + "/api/tradeRetailPlanMonthDetail",
    {
      data: data
    }
  );
};
export const delTradeRetailPlanMonth = (data?: object) => {
  return http.request<any>(
    "delete",
    baseUrlProxy + "/api/tradeRetailPlanMonthDetail",
    {
      data: data
    }
  );
};
export const getTradeRetailPlanHour = (data?: object) => {
  return http.request<any>(
    "get",
    baseUrlProxy + "/api/tradeRetailPlanTimeDetail",
    {
      params: data
    }
  );
};
export const addTradeRetailPlanHour = (data?: object) => {
  return http.request<any>(
    "post",
    baseUrlProxy + "/api/tradeRetailPlanTimeDetail",
    {
      data: data
    }
  );
};
export const editTradeRetailPlanHour = (data?: object) => {
  return http.request<any>(
    "put",
    baseUrlProxy + "/api/tradeRetailPlanTimeDetail",
    {
      data: data
    }
  );
};
export const delTradeRetailPlanHour = (data?: object) => {
  return http.request<any>(
    "delete",
    baseUrlProxy + "/api/tradeRetailPlanTimeDetail",
    {
      data: data
    }
  );
};

export const getTradeRetailPlanBase = (data?: object) => {
  return http.request<any>(
    "get",
    baseUrlProxy + "/api/tradeRetailPlanBaseDetail",
    {
      params: data
    }
  );
};
export const addTradeRetailPlanBase = (data?: object) => {
  return http.request<any>(
    "post",
    baseUrlProxy + "/api/tradeRetailPlanBaseDetail",
    {
      data: data
    }
  );
};
export const editTradeRetailPlanBase = (data?: object) => {
  return http.request<any>(
    "put",
    baseUrlProxy + "/api/tradeRetailPlanBaseDetail",
    {
      data: data
    }
  );
};
export const delTradeRetailPlanBase = (data?: object) => {
  return http.request<any>(
    "delete",
    baseUrlProxy + "/api/tradeRetailPlanBaseDetail",
    {
      data: data
    }
  );
};

// /api/tradeRetailPlanMonthDetail/by_planId

export const getTradeRetailPlanMonthDetailByPlanId = (data?: object) => {
  return http.request<any>(
    "get",
    baseUrlProxy + "/api/tradeRetailPlanMonthDetail/by_planId",
    {
      params: data
    }
  );
};
export const getTradeRetailPlanTimeDetailByPlanIdMonthId = (data?: object) => {
  return http.request<any>(
    "get",
    baseUrlProxy + "/api/tradeRetailPlanTimeDetail/get_by_planId_monthId",
    {
      params: data
    }
  );
};
export const getTradeRetailPlanBaseDetailByPlanId = (data?: object) => {
  return http.request<any>(
    "get",
    baseUrlProxy + "/api/tradeRetailPlanBaseDetail/get_by_planId",
    {
      params: data
    }
  );
};
